<?php
/**
 * Created by PhpStorm.
 * User: HP_USER
 * Date: 2018/9/13
 * Time: 17:40
 */

include_once ('blockchain.php');
$time1=time();
set_time_limit(0);
$bc  =new Blockchain();

$bc->addBlock('This is block1');
$bc->addBlock('This is block2');

$bc->printBlockchain();
//foreach ($bc->blocks as $block) {
//    printf("PrevHash: %s<br>", $block->prevHash);
//    printf("Hash: %s<br>", $block->hash);
//    printf("Data: %s<br>", $block->data);
//    printf("PoW: %s<br>", $block->validate() ? 'true' : 'false');
//    printf('<br>');
//}
echo $time1-time();

